package com.bc.bczbweb.controller.Ajax;

import com.bc.commonentity.common.JsonResult;
import com.bc.bcapi.service.T_User_withdrawService;
import com.bc.bcmodel.domain.T_User_withdrawModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.PostConstruct;
import javax.ws.rs.POST;

@RestController
@RequestMapping("ajax/t_user_withdraw")
public class AjaxT_User_withdrawController {
    @Autowired
    T_User_withdrawService t_User_withdrawService;

    @POST
    @RequestMapping(value = "success", method = RequestMethod.POST)
    public JsonResult success(T_User_withdrawModel req) {
        try {
            return t_User_withdrawService.success(req);
        } catch (Exception e) {
            e.printStackTrace();
            return new JsonResult(0, "error" + e.getMessage());
        }
    }

    @POST
    @RequestMapping(value = "fail", method = RequestMethod.POST)
    public JsonResult fail(T_User_withdrawModel req) {
        try {
            return t_User_withdrawService.fail(req);
        } catch (Exception e) {
            e.printStackTrace();
            return new JsonResult(0, "error" + e.getMessage());
        }
    }

}